/*
 * TokenizerExpression.cpp
 *
 *  Created on: 27/10/2008
 *      Author: Thiago A. L. Genez
 */

#include "TokenizerExpression.h"

TokenizerExpression::TokenizerExpression() {

}

TokenizerExpression::~TokenizerExpression() {
}

TokenizerExpression::TokenizerExpression(string token, string category,
		string type, int numberParameters) {
	this->setToken(token);
	this->setCategory(category);
	this->setType(type);
	this->setNumberParameters(numberParameters);
}

Parametro *TokenizerExpression::getParametro(int index){
	list<Parametro*>::iterator it;
	Parametro* retorno;
	int i = 0;

	for (it = this->parameter.begin(); it != this->parameter.end(); it++) {
		if (index == i) {
			retorno = (*it);
		}
		i++;
	}
	return retorno;
}

void TokenizerExpression::setParametros(list<Parametro*> parametros) {
	this->parameter = parametros;
}

void TokenizerExpression::setToken(string token) {
	this->token = token;
}

void TokenizerExpression::setCategory(string category) {
	this->category = category;
}

void TokenizerExpression::setType(string type) {
	this->type = type;
}

void TokenizerExpression::setNumberParameters(int qtd) {
	this->numberParameters = qtd;
}

void TokenizerExpression::addParameters(Parametro* parametro) {
	this->parameter.push_back(parametro);
}

string TokenizerExpression::getToken() const {
	return (this->token);
}

string TokenizerExpression::getCategory() const {
	return (this->category);
}

string TokenizerExpression::getType() const {
	return (this->type);
}

int TokenizerExpression::getNumberParameters() const {
	return (this->numberParameters);
}

void TokenizerExpression::setLine(int line){
	this->linha = line;
}

int TokenizerExpression::getLine() const{
	return(this->linha);
}

list<Parametro*> TokenizerExpression::getListParameter() const{
	return this->parameter;
}

